export {}

// interface接口: 定义对象类型的另一种语法
interface Person {
  name: string,
  age: number,
  say: () => void
}

let person: Person = {
  name: '赵鑫',
  age: 18,
  say() {
    console.log('151我最强')
  }
}

// interface的特性 继承

interface Point2D {
  x: number
  y: number
}

// interface Point3D {
//   x: number
//   y: number
//   z: number
// }

interface Point3D extends Point2D {
  // 后面的大括号可以写自己独有的属性和类型
  z: number
  name: string
}

let point: Point3D = {
  x: 10,
  y: 20,
  z: 30,
  name: '我是坐标系'
}